
const { DataTypes } = require('sequelize')

const seq = require('../db/seq')
const ExpImg = require('./expImg.model')

const Expense = seq.define('expense', {

    id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
    empId: DataTypes.INTEGER,
    empName: DataTypes.STRING,
    initiationTime: DataTypes.DATEONLY,
    empId: DataTypes.INTEGER,
    money: DataTypes.INTEGER,
    expType: DataTypes.INTEGER,
    remark: DataTypes.STRING,
    status: DataTypes.INTEGER,
    reviewId: DataTypes.INTEGER,
    reviewName: DataTypes.STRING
}, {
    tableName: 'expense'
})
Expense.hasMany(ExpImg,{foreignKey:'expId'})
module.exports = Expense